package oop.ex2.enums;

import java.util.regex.Pattern;



public enum VariableTypes {
	STRING("^\\s*(String)\\s+([A-Za-z]+\\w*|_[A-Za-z]+\\w*)\\s*(=*\\s*\".+\"\\s*;|\\s*;)"),
	INT("^\\s*(int)\\s+([A-Za-z]+\\w*|_[A-Za-z]+\\w*)\\s*(=*\\s*-*\\d+\\s*;|\\s*;)"),
	DOUBLE("^\\s*(double)\\s+([A-Za-z]+\\w*|_[A-Za-z]+\\w*)\\s*(=*\\s*-*\\d+\\.*\\d*\\s*;|\\s*;)"),
	CHAR("^\\s*(char)\\s+([A-Za-z]+\\w*|_[A-Za-z]+\\w*)\\s*(=*\\s*\'.\'\\s*;|\\s*;)"),
	BOOLEAN("^\\s*(boolean)\\s+([A-Z-a-z]+\\w*|_[A-Za-z]+\\w*)\\s*((=*\\s*(true|false|-*\\d+\\.*\\d*)\\s*;)|\\s*;)");
	
	private Pattern patt;
	
	private VariableTypes(String expression){
		patt=Pattern.compile(expression);
	}
	
	public Pattern getPattern(){
		return patt;
	}

}
